package com.yuke.cloud.service.pmc.controller.frontend;

import com.yuke.cloud.common.core.support.BaseController;
import com.yuke.cloud.common.util.wrapper.WrapMapper;
import com.yuke.cloud.common.util.wrapper.Wrapper;
import com.yuke.cloud.service.pmc.entity.DicRegion;
import com.yuke.cloud.service.pmc.service.DicRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* Created by zys on 2018/09/30.
*/
@Api(value = "WEB - DicRegionController", tags = "处理DicRegion相关请求", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping("/mall/dic/region")
public class MallDicRegionController extends BaseController {
    @Resource
    private DicRegionService dicRegionService;

    @GetMapping("app")
    @ApiOperation(httpMethod = "GET", value = "分页获取所有记录")
    public Wrapper<List<DicRegion>> list() {
        List<DicRegion> list = dicRegionService.findAll();
        return WrapMapper.ok(list);
    }
}
